﻿#pragma once
#include <iostream>
using namespace std;
#include "Point.h"

//5.圆类；
class Circle
{
public:
	//6.设置和获取半径；
	void setR(int r);
	/*{
		m_R = r;
	}*/
	int getR();
	/*{
		return m_R;
	}*/

	//7.设置和获取圆心；
	void setCenter(Point p);
	/*{
		m_Center = p;
	}*/
	Point getCenter();
	/*{
		return m_Center;
	}*/
	//11.利用成员函数判断点和圆的关系；
	void isInCircleByClass(Point& p);
	/*{
		//9.获取圆心和点的距离的平方；
		int distance = (m_Center.getX() - p.getX()) * (m_Center.getX() - p.getX()) + (m_Center.getY() - p.getY()) * (m_Center.getY() - p.getY());
		int rDistance = m_R * m_R;
		if (rDistance == distance)
		{
			cout << "成员函数：：点在圆上！" << endl;
		}
		else if (rDistance > distance)
		{
			cout << "成员函数：：点在圆内！" << endl;
		}
		else
		{
			cout << "成员函数：：点在圆外！" << endl;
		}
	}*/

private:
	//2.半径；
	int m_R;
	//3.圆心；
	Point m_Center;
};
